package top.javarem.medical.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.javarem.medical.common.response.Response;
import top.javarem.medical.domain.dto.UserCreditRankDTO;
import top.javarem.medical.service.UserCreditService;

import javax.annotation.Resource;
import java.util.List;


@Slf4j
@RestController
@RequestMapping("/api/v1/medical/credit")
@CrossOrigin("*")
public class UserCreditController {

    @Resource
    private UserCreditService userCreditService;

    //查询用户信用排名
    @GetMapping("query_user_credit_rank")
    public Response<List<UserCreditRankDTO>> queryUserCreditRank() {

        List<UserCreditRankDTO> userCreditRankDTOList = userCreditService.queryUserCreditRank();
        return Response.success(userCreditRankDTOList);

    }

}
